package com.hotel.tv.entities.auth;

import com.autumn.constants.SettingConstants;
import com.autumn.mybatis.mapper.annotation.TableDocument;
import com.autumn.zero.authorization.entities.common.AbstractUser;
import com.hotel.tv.constants.HotelUserTypeConstant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-10 10:28
 **/
@ToString(callSuper = true)
@Getter
@Setter
@Table(name = SettingConstants.SYS_TABLE_PREFIX + "_user")
@TableDocument(value = "系统用户", group = "系统表", groupOrder = Integer.MAX_VALUE)
public class HotelUser extends AbstractUser implements HotelAuthEntity {

    @GeneratedValue(strategy = GenerationType.TABLE)
    @Override
    public Long getId() {
        return super.getId();
    }

    /**
     * 用户类型 {@link HotelUserTypeConstant}
     */
    @Column(nullable = false)
    private Integer userType;

    /**
     * 组织id(表示多个组织的id)
     */
    @Column(nullable = true)
    private Long organizeId;
}
